#include <iostream>
#include "BiGraph.h"

using namespace std;

int main(){
    BiGraph<int> BG;
    BG.add_edge(1,2,1);
    BG.add_edge(1,4,2);
    BG.add_edge(1,1,3);
    BG.add_edge(1,3,4);
    BG.delete_edge(1,4);
    BG.add_vertex(3);
    BG.add_edge(3,4,5);
    BG.add_edge(3,1,6);
    BG.add_edge(2,1,7);
    BG.add_vertex(5);
    BG.delete_edge(5,10);
    BG.add_edge(3,5,8);
    
    for( BiGraph<int>::Vertex_Iterator i=BG.begin(); i!= BG.end(); ++i){
        cout<<"Vertex: "<<i->get_name()<<endl;
        for( BiGraph<int>::Out_Edge_Iterator y=i->out_edge_begin(); y!= i->out_edge_end(); ++y){
            cout<<(y->get_name()).first<<"-"<<(y->get_name()).second<<endl;
        }
        
        for( BiGraph<int>::In_Edge_Iterator y=i->in_edge_begin(); y!= i->in_edge_end(); ++y){
            cout<<(y->get_name()).first<<"-"<<(y->get_name()).second<<endl;
        }
        cout<<endl;
    }

    system("pause");
    return 0;
}
